package com.platform.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.NewsDao;
import com.platform.entity.NewsEntity;
import com.platform.service.NewsService;

/**
 * Service实现类
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2018-08-30 14:57:32
 */
@Service("newsService")
public class NewsServiceImpl implements NewsService {
    @Autowired
    private NewsDao newsDao;

    @Override
    public NewsEntity queryObject(Integer id) {
        return newsDao.queryObject(id);
    }

    @Override
    public List<NewsEntity> queryList(Map<String, Object> map) {
        return newsDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return newsDao.queryTotal(map);
    }

    @Override
    public int save(NewsEntity news) {
        return newsDao.save(news);
    }

    @Override
    public int update(NewsEntity news) {
        return newsDao.update(news);
    }

    @Override
    public int delete(Integer id) {
        return newsDao.delete(id);
    }

    @Override
    public int deleteBatch(Integer[]ids) {
        return newsDao.deleteBatch(ids);
    }
}
